import request from '@/utils/request'

export function addDiary(plantDiary){
    return request({
        url: '/diary/addDiary',
        method: 'post',
        headers: {
            isToken: false
        },
        data:plantDiary
    })
}
export function updateDiary(diary){
    return request({
        url: '/diary/updateDiary',
        method: 'put',
        headers: {
            isToken: false
        },
        data:diary

    })
}
export function getDiaryByPlantId(id){
    return request({
        url:'/diary/getDiaryByPlantId/'+id,
        method:'get',
        headers:{
            isToken: false
        },

    })
}

export function getDiary(params){
    return request({
        url:'/diary/find',
        method:'get',
        headers:{
            isToken: false
        },
        data:params

    })
}